package com.aaa.mrcai.controller;

import com.aaa.mrcai.annotion.AAALog;
import com.aaa.mrcai.pojo.vo.SellerVO;
import com.aaa.mrcai.result.AjaxResult;
import com.aaa.mrcai.service.SellerService;
import com.aaa.mrcai.service.impl.SellerServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author meowyf
 * @version 1.0
 * @Name Z_MJ
 * @date 2021/12/09 11:34:06
 */
@RestController
@RequestMapping("seller")
public class sellerController {
    @Autowired
    private SellerService sellerService;

    @RequestMapping("/list/{uid}")
    public AjaxResult list(@PathVariable int uid){
        return sellerService.list(uid);
    }

    @RequestMapping("listState")
    public AjaxResult listState(){
        return sellerService.listState();
    }

    @RequestMapping("updateSeller")

    public AjaxResult updateSeller(SellerVO sellerVO){
        System.out.println(sellerVO);
        return sellerService.updateSeller(sellerVO);
    }
}
